<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>上传图片</title>
</head>
<body>
<h1>上传图片</h1>

<form action="/snack-sale/upload" method="post" enctype="multipart/form-data">

    <label for="name">名称:</label>
    <input type="text" id="name" name="name" required><br>

    <label for="name">类别(1:零食, 2:水果):</label>
    <input type="text" id="category_id" name="category_id" required><br>

    <label for="price">价格:</label>
    <input type="text" id="price" name="price" required><br>

    <label>图片:</label>
    <input type="file" name="image" accept="image/*" required>

    <input type="hidden" name="create_time" value="<%= new java.util.Date() %>">

    <br><br>
    <input type="button" value="上传">
</form>
</body>
</html>
